﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
namespace QLTVNEW.Report
{
    public partial class frmInMuonNhieurpt : Form
    {
        public frmInMuonNhieurpt()
        {
            InitializeComponent();
        }
         private bool dataSource;
        public bool DataSource
        {
            get { return dataSource; }
            set { dataSource = value; }
        }

        private ReportDocument reportToPrint;
        public ReportDocument ReportToPrint 
        {
            get { return reportToPrint; }
            set { reportToPrint = value; }
        }
        private DataSet dataSetForReport;
        public DataSet DataSetForReport
        {
            get { return dataSetForReport; }
            set { dataSetForReport = value; }
        }
        private DataTable dataTableForReport;
        public DataTable DataTableForReport
        {
            get { return dataTableForReport; }
            set { dataTableForReport = value; }
        }

        private void frmInMuonNhieurpt_Load(object sender, EventArgs e)
        {
            switch (DataSource)
            {
                case true:
                    reportToPrint.SetDataSource(dataSetForReport);
                    break;
                case false:
                    reportToPrint.SetDataSource(dataTableForReport);
                    break;
            }
            this.crystalReportViewer1.ReportSource = reportToPrint;
            crystalReportViewer1.RefreshReport();
        }

     
    }



       

}
